import { SimplelistInfo } from "@/api/dmsIms/info";

const prolist = {
  state: {
    simpleProList: [],
  },
  mutations: {
    GET_PRO_LIST: (state, payload) => {
      state.simpleProList = payload;
    },
  },
  actions: {
    // 获取项目列表数据
    getProList({ commit }) {
      return new Promise((resolve, reject) => {
        SimplelistInfo()
          .then((response) => {
            commit("GET_PRO_LIST", response.rows);
            resolve();
          })
          .catch((error) => {
            reject(error);
          });
      });
    },
  },
};

export default prolist;
